# filename: example8_30

print('int() default:', int())
print('str to int:', int('010'))
print("int('0xa', 16) =", int('0xa', 16))
print("int('10', 10) =", int('10', 10))
print("int('12', 8) =", int('12', 8))
print("int('1010', 2) =", int('1010', 2))

print('float default:', float())
print('str to float:', float('123.01'))
print('int to float:', float(32))

print('create a complex:', complex(12, 32))

print('str() default:', str())
print('float to str:', str(232.33))
print('int to str:', str(32))
lists = ['a', 'b', 'e', 'c', 'd', 'a']
print('list to str:', str(lists))

strs = 'hongten'
print('str to list:', list(strs))
print('list to tuple:', tuple(lists))

print('int to chr:', chr(67))
print('chr to int:', ord('C'))
print('int to 16:', hex(12))
print('int to 8:', oct(12))
